
public class Var
{
	public static void main(String args[])
	{
		int a = 3;
		//float f =3.14;
		float f = (float)3.14;
		float f2 =3.14f;

		int i = 4;
		short j =4;
		short j2 =(short)40000;  //OK

		//j = i ; // failed
		//j = j + 1 ;  //failed , when calculating,auto convert to int 
		//j = j+ j2;  //failed , when calculating,auto convert to int 
		j = (short) (j + 1) ;  //OK
		j =(short)(j+ j2) ;  //OK
		

		/* Java has no pointer    */
		//int* p =malloc(10*sizeof(int));
		int p[] = new int[10];
		int p2[] ={1,2,4}; //static alloc
		
		//char str[100];    //failed
		char str[] = new char[100];  //OK
		//char str2[] = "abc";
		String str2 = "abc";

		p = null;
		p2 = null;
		str = null;
		str2 = null;
		
	
	}

}







